CXX = g++
CXXFLAGS = -O3 -std=c++17 
SRC = main.cpp WordManager.cpp GameLogic.cpp PlayerInput.cpp
OBJ = $(SRC:.cpp=.o)
TARGET = hangman

all: $(TARGET)

$(TARGET): $(OBJ)
	$(CXX) $(CXXFLAGS) -o $@ $^

%.o: %.cpp
	$(CXX) $(CXXFLAGS) -c $< -o $@

clean:
	rm -f *.o 

run: $(TARGET)
	./$(TARGET)
